﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="ARSS.Host.Visual.MainWindow"
    Title="Host" 
    WindowStartupLocation="CenterScreen" SizeToContent="Height" Height="336" Width="354" mc:Ignorable="d"  Style="{DynamicResource MyWindow}" ResizeMode="NoResize">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Theme/MyTheme.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <DataTemplate x:Key="ClientListTemplate">
            	<Canvas Height="74" Focusable="True" MouseEnter="Canvas_MouseEnter" MouseLeave="Canvas_MouseLeave" MouseRightButtonUp="Canvas_MouseRightButtonUp">
            		<Border x:Name="ItemBorder" BorderBrush="#FFE9F414" BorderThickness="1" Width="80" Height="85" Focusable="True" Visibility="Hidden" CornerRadius="5" Background="{x:Null}"/>
            		<StackPanel Width="80" Canvas.Left="1" Canvas.Top="1" >
            			<Image Margin="0" Width="64" Height="64" Source="ppl.png" Stretch="Fill" Canvas.Left="6.002" HorizontalAlignment="Center"/>
            			<Label x:Name="NameLabel" Width="Auto" Margin="0" VerticalAlignment="Stretch" Height="Auto" Content="{Binding Name}" Canvas.Top="44" Foreground="White" HorizontalAlignment="Center" HorizontalContentAlignment="Center" />
            		</StackPanel>
            		<Button x:Name="KickButton" Width="75" Content="Kick User" Canvas.Left="1" Canvas.Top="25" Height="29.277" Visibility="Hidden" Click="KickButton_Click"/>
            	</Canvas>
            </DataTemplate>
            <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
            	<WrapPanel IsItemsHost="True" ItemWidth="80" ItemHeight="90"/>
            </ItemsPanelTemplate>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
    	<GroupBox Margin="0,8,0,0" VerticalAlignment="Top" Height="103.667" Header="General">
    		<Button x:Name="HostButton" Background="{DynamicResource BlackGlossy_RadialBG}" HorizontalAlignment="Right" Margin="0,0,2,1.559" Width="59.334" Content="Host"  Foreground="#FFFFFFFF" Click="HostButton_Click" VerticalAlignment="Bottom" Height="34.663" />
    	</GroupBox>
    	<TextBlock HorizontalAlignment="Left" Margin="7,71.661,0,0" VerticalAlignment="Top" Width="65.333" Height="18.009" Text="Hosting Port: " TextWrapping="Wrap"/>
    	<TextBlock x:Name="StatusTextBlock" Margin="8,92,78.5,0" VerticalAlignment="Top" Height="16.057" TextWrapping="Wrap"/>
    	<TextBlock HorizontalAlignment="Left" Margin="8,41.67,0,0" VerticalAlignment="Top" Width="75.333" Height="16" Text="Scene File:" TextWrapping="Wrap"/>
    	<GroupBox Margin="0,115.667,0,55.666" Header="Connected Clients" Focusable="True">
    		<ItemsControl x:Name="ClientsItemsControl" Margin="2,4.389,2,2" ItemTemplate="{DynamicResource ClientListTemplate}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}"/>
    	</GroupBox>
    	<TextBox x:Name="SceneFileTextBox" VerticalAlignment="Top" Text="" Margin="73.333,38.389,71.09,0"/>
    	<Button x:Name="OpenFileButton" HorizontalAlignment="Right" Margin="0,38.389,39.09,0" VerticalAlignment="Top" Width="28" Height="19.277" Content="..." Click="OpenFileButton_Click"/>
    	<TextBox x:Name="PortTextBox" Margin="73.333,69.661,0,0" VerticalAlignment="Top" TextWrapping="Wrap" HorizontalAlignment="Left" Width="64.91" Text="1234"/>
    	<Button x:Name="StartButton" Margin="0,0,0,8" VerticalAlignment="Bottom" Height="43.666" Background="{DynamicResource BlackGlossy_RadialBG}" Content="Start Session" Foreground="White" Click="StartButton_Click" IsEnabled="False"/>
    </Grid>
</Window>
